<p class="Paragraph">Text: Any string expression that contains an unambiguous file specification. The <help:link Id="66636" Eid="urllocal" xmlns:help="http://openoffice.org/2000/help">URL notation</help:link> can also be used here.</p>
<p class="Paragraph">This function is used to determine the MS-Dos file attributes for a specified file. This function returns as a result a bit pattern which helps you to identify the file attributes as follows:</p>
<p class="P2">Value</p>
<p class="Paragraph">0 : Normal files.</p>
<p class="Paragraph">1 : Read-only files.</p>
<p class="Paragraph">2 : Hidden files.</p>
<p class="Paragraph">4 : System files.</p>
<p class="Paragraph">8 : Returns the name of the volume</p>
<p class="Paragraph">16 : Returns the name of the directory only.</p>
<p class="Paragraph">32 : File was changed since last backup (Archive bit).</p>
<p class="Paragraph">If you want to know whether a bit of the attribute byte is set, please use the following query method:</p>
<p class="P2">Example:</p>
<p class="PropText">Sub ExampleSetGetAttr</p>
<p class="PropText">On Error Goto ErrorHandler REM Define target for error-handler</p>
<p class="PropText">If Dir("C:\test",16)="" Then MkDir "C:\test"</p>
<p class="PropText">If Dir("C:\test\autoexec.sav")="" THEN Filecopy "c:\autoexec.bat", "c:\test\autoexec.sav"</p>